package com.peas.platform.module.icims.base.mdm.adapter.repository.po;

import java.util.*;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.peas.platform.common.core.annotation.Comment;
import com.peas.platform.framework.mybatisplus.po.BasePo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;
import javax.validation.constraints.*;

// 站内信
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "`tbl_message`")
public class MessagePo extends BasePo {

    // 站内信类型
    @Comment(value = "站内信类型")
    @Size(max = 20, message = "站内信类型不能超过20个字符")
    @TableField(value = "`message_type`", jdbcType = JdbcType.VARCHAR)
    private String messageType;

    // 站内信标题
    @Comment(value = "站内信标题")
    @Size(max = 100, message = "站内信标题不能超过100个字符")
    @TableField(value = "`title`", jdbcType = JdbcType.VARCHAR)
    private String title;

    // 站内信内容
    @Comment(value = "站内信内容")
    @TableField(value = "`content`", jdbcType = JdbcType.CLOB)
    private String content;

    // 状态
    @Comment(value = "状态")
    @Size(max = 20, message = "状态不能超过20个字符")
    @TableField(value = "`state`", jdbcType = JdbcType.VARCHAR)
    private String state;

    // 用户ID
    // （用户表）外键
    @Comment(value = "用户ID")
    @TableField(value = "`user_id`", jdbcType = JdbcType.BIGINT)
    private Long userId;

    // 已读时间
    @Comment(value = "已读时间")
    @TableField(value = "`read_time`", jdbcType = JdbcType.TIMESTAMP)
    private Date readTime;

    // 操作链接
    @Comment(value = "操作链接")
    @Size(max = 200, message = "操作链接不能超过200个字符")
    @TableField(value = "`url`", jdbcType = JdbcType.VARCHAR)
    private String url;

}
